package com.ruoyi.lab.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lab.mapper.LabSeatOperateMapper;
import com.ruoyi.lab.domain.LabSeatOperate;
import com.ruoyi.lab.service.ILabSeatOperateService;

/**
 * 座位操作日志Service业务层处理
 * 
 * @author dn
 * @date 2024-01-01
 */
@Service
public class LabSeatOperateServiceImpl implements ILabSeatOperateService 
{
    @Autowired
    private LabSeatOperateMapper labSeatOperateMapper;

    /**
     * 查询座位操作日志
     * 
     * @param operateId 座位操作日志主键
     * @return 座位操作日志
     */
    @Override
    public LabSeatOperate selectLabSeatOperateByOperateId(Long operateId)
    {
        return labSeatOperateMapper.selectLabSeatOperateByOperateId(operateId);
    }

    /**
     * 查询座位操作日志列表
     * 
     * @param labSeatOperate 座位操作日志
     * @return 座位操作日志
     */
    @Override
    public List<LabSeatOperate> selectLabSeatOperateList(LabSeatOperate labSeatOperate)
    {
        return labSeatOperateMapper.selectLabSeatOperateList(labSeatOperate);
    }

    /**
     * 新增座位操作日志
     * 
     * @param labSeatOperate 座位操作日志
     * @return 结果
     */
    @Override
    public int insertLabSeatOperate(LabSeatOperate labSeatOperate)
    {
        labSeatOperate.setOperateId(System.currentTimeMillis());
        labSeatOperate.setWorkno(SecurityUtils.getUsername());
        labSeatOperate.setCreateTime(DateUtils.getNowDate());
        return labSeatOperateMapper.insertLabSeatOperate(labSeatOperate);
    }

    /**
     * 修改座位操作日志
     * 
     * @param labSeatOperate 座位操作日志
     * @return 结果
     */
    @Override
    public int updateLabSeatOperate(LabSeatOperate labSeatOperate)
    {
        return labSeatOperateMapper.updateLabSeatOperate(labSeatOperate);
    }

    /**
     * 批量删除座位操作日志
     * 
     * @param operateIds 需要删除的座位操作日志主键
     * @return 结果
     */
    @Override
    public int deleteLabSeatOperateByOperateIds(Long[] operateIds)
    {
        return labSeatOperateMapper.deleteLabSeatOperateByOperateIds(operateIds);
    }

    /**
     * 删除座位操作日志信息
     * 
     * @param operateId 座位操作日志主键
     * @return 结果
     */
    @Override
    public int deleteLabSeatOperateByOperateId(Long operateId)
    {
        return labSeatOperateMapper.deleteLabSeatOperateByOperateId(operateId);
    }
}
